import styles from './index.css';
import { connect } from 'dva';
import Link from 'umi/link';
import House from '../components/House/house';


function housePage ( {dispatch, house, loading} ) {
  return (
    <div>
      <House
      loading={loading}
      page={house.page}
      listPage={({ current }) => {
        dispatch({
          type: 'house/listPage',
          payload: { current }
        });
      }} />
    </div>
  );
}

// function mapStateToProps(state) {
//   console.log("state", state);
//   const { house } = state;
//   return {
//     house,
//   }
// }

export default connect(({ house, loading })=>({ house, loading }))(housePage);
